php if negative then 0

38

$value = -9;
echo max($value, 0); // Outputs '0'

Comments

Submit
0 Comments